import request from '@/utils/request'

// 创建协议
export function createAgreement(data) {
  return request({
    url: '/system/agreement/create',
    method: 'post',
    data: data
  })
}

// 更新协议
export function updateAgreement(data) {
  return request({
    url: '/system/agreement/update',
    method: 'put',
    data: data
  })
}

// 删除协议
export function deleteAgreement(id) {
  return request({
    url: '/system/agreement/delete?id=' + id,
    method: 'delete'
  })
}

// 获得协议
export function getAgreement(id) {
  return request({
    url: '/system/agreement/get?id=' + id,
    method: 'get'
  })
}

// 获得协议分页
export function getAgreementPage(params) {
  return request({
    url: '/system/agreement/page',
    method: 'get',
    params
  })
}
// 导出协议 Excel
export function exportAgreementExcel(params) {
  return request({
    url: '/system/agreement/export-excel',
    method: 'get',
    params,
    // responseType: 'blob'
  })
}